begin
@f = File.new("input.txt",'r+')
rescue Exception
  puts("File not found")
else
  f1 = File.new("output.txt",'w+')
  while(!@f.eof) do
    @c = @f.getc().to_s
   v = @c.swapcase
    f1.write(v)
  end
  @f.close()
  f1.close()
  puts("finish")
end

